package com.mashibing.internalcommon.util;

import com.sun.jdi.event.StepEvent;

public class RedisPrefixUtils {

    // 乘客验证码的前缀

   public static String verificationCodePrefix = "verification-code-";
    // token存储的前缀
    public static String tokenPrefix = "token-";

    public static String blackDeviceCodePrefix = "black-device-";
    /**
     * 根据手机号生成key
     *
     * @param phone
     * @param identity
     * @return
     */
    public static String generatorKeyByPhone(String phone,String identity) {
        return verificationCodePrefix + identity+ "-" + phone;
    }

    /**
     * 根据phone和identity生成token的key
     *
     * @param phone
     * @param identity
     * @return
     */
    public static String generatorTokenKey(String phone, String identity, String tokenType) {
        return tokenPrefix + phone + "-" + identity+"-"+tokenType;
    }
}